#! /usr/bin/env bash

sed_cmd='s/id_[0-9]*/id_/g'

if [ -z "$1" ]
then
	# read from stdin, write to stdout
	sed -e "$sed_cmd"
elif [ -z "$2" ]
then
	# read from $1, write to stdout
	sed -e "$sed_cmd" $1
else
	# read from $1, write to $2
	sed -e "$sed_cmd" $1 > $2
fi

